// 测试日期操作

const users = [
    {
      username: 102000,
      pwd: '142FAb3D-FEB6-62dD-f533-8fFcDC7fF4Da',
      createDate: '2022-12-26 09:01:35'
    },
    {
      username: 102001,
      pwd: '33DbEbB8-Fb17-bAEd-D18b-dA80FDBc339b',
      createDate: '2022-12-23 18:59:08'
    },
    {
      username: 102002,
      pwd: 'ecF7B123-9876-78Ce-c4Ce-88D5b6CeF9d3',
      createDate: '2022-12-01 01:57:14'
    },
    {
      username: 102003,
      pwd: 'a8bc5Dbf-B1De-3F7B-f5ed-76DdfC717315',
      createDate: '2022-12-09 01:29:36'
    },
    {
      username: 102004,
      pwd: '0EDED5F2-39AF-DaC1-CAEB-200bfBD0377D',
      createDate: '2022-12-29 23:19:11'
    },
    {
      username: 102005,
      pwd: 'AB923BAC-6Efb-80e4-68dc-8D5dFae164D0',
      createDate: '2022-12-05 22:07:36'
    },
    {
      username: 102006,
      pwd: '3DCBe2fd-9Be5-b696-cB94-f06Aae83F3f2',
      createDate: '2022-12-21 05:28:52'
    },
    {
      username: 102007,
      pwd: '85d25ebB-eDFc-Bf7B-c158-07bFa591C19D',
      createDate: '2022-12-23 19:52:31'
    },
    {
      username: 102008,
      pwd: 'dd06921C-Ef28-6c88-2b36-eC4cA429f11A',
      createDate: '2022-12-24 07:46:19'
    },
    {
      username: 102009,
      pwd: '7FA51BAB-9f7b-E716-BaB0-B64EfCCdfe76',
      createDate: '2022-12-08 10:27:05'
    },
    {
      username: 102010,
      pwd: 'ec73b1Ba-1cc9-f7A9-aBc4-1CB1cB241FBD',
      createDate: '2022-12-29 16:04:25'
    },
    {
      username: 102011,
      pwd: '9Db1eC4C-C841-a83c-4AaD-29ff4b914D48',
      createDate: '2022-12-07 13:03:05'
    },
    {
      username: 102012,
      pwd: 'd043CAeC-BfF0-f76A-DbAD-CE5F71f82b94',
      createDate: '2022-12-07 00:03:28'
    },
    {
      username: 102013,
      pwd: 'CbdeeEbA-92Ba-E5d7-3B8F-dFD7DFD7BFed',
      createDate: '2022-12-17 21:14:38'
    },
    {
      username: 102014,
      pwd: '288f1C85-e277-39E6-D6b3-f8b1BEdcAabb',
      createDate: '2022-12-13 09:08:27'
    },
    {
      username: 102015,
      pwd: 'Bd3B4Ec9-D9AA-6A42-AB37-764db16B3dFA',
      createDate: '2022-12-07 20:35:53'
    },
    {
      username: 102016,
      pwd: '2C572f0e-b2ac-A80C-9075-1e0BdE62b268',
      createDate: '2022-12-13 23:00:51'
    },
    {
      username: 102017,
      pwd: '7beA8E12-b364-7CA6-0959-30e9CB5838de',
      createDate: '2022-12-12 23:19:41'
    },
    {
      username: 102018,
      pwd: 'cd66290f-56eC-Eaa9-5c4C-c1d4cD230A5B',
      createDate: '2022-12-26 14:23:46'
    },
    {
      username: 102019,
      pwd: 'bee1c5ce-D514-5EC2-76Ec-Ca5b1ca4FdfC',
      createDate: '2022-12-18 14:34:16'
    },
    {
      username: 102020,
      pwd: 'De13a1a9-DCDF-DeeD-b5a3-09c921FB82D3',
      createDate: '2022-12-15 13:17:31'
    },
    {
      username: 102021,
      pwd: '20aAFd98-BcEB-CE4A-bbe1-cFea9F7cC94d',
      createDate: '2022-12-15 18:56:58'
    },
    {
      username: 102022,
      pwd: 'fAf1cE98-f094-d726-a2Cc-834f6eAA5e69',
      createDate: '2022-12-28 12:22:47'
    },
    {
      username: 102023,
      pwd: '2CFa42b6-bba2-C4A5-d5cB-E81C5ff83b43',
      createDate: '2022-12-02 02:16:48'
    },
    {
      username: 102024,
      pwd: '2cFCA996-AeAc-bD5d-9bF7-1C473822bdBf',
      createDate: '2022-12-25 18:39:29'
    },
    {
      username: 102025,
      pwd: '09ED148e-9DF8-Ddea-332f-E1b5ded37cc3',
      createDate: '2022-12-11 11:33:47'
    },
    {
      username: 102026,
      pwd: 'FbDdcBdD-ba95-365C-2b55-6DCaA2ea2c18',
      createDate: '2022-12-29 08:47:10'
    },
    {
      username: 102027,
      pwd: 'Ccdf72D1-8f4A-AB1e-346d-faa5Ba9F9d6B',
      createDate: '2022-12-23 08:12:01'
    },
    {
      username: 102028,
      pwd: '54cdF7DE-19fF-9c92-AcDD-F65a95C42EFd',
      createDate: '2022-12-12 14:34:02'
    },
    {
      username: 102029,
      pwd: 'dD9C10AE-b7Cc-8dDc-B74c-CEd93f5fA2cC',
      createDate: '2022-12-27 00:11:39'
    },
    {
      username: 102030,
      pwd: 'A66cb2b3-96cb-Cd0c-0f9d-6F96ECc3e1fC',
      createDate: '2022-12-27 05:32:42'
    },
    {
      username: 102031,
      pwd: 'BbF6A865-fBCD-f7Ab-A675-91D4Cd276BEc',
      createDate: '2022-12-16 16:51:16'
    },
    {
      username: 102032,
      pwd: 'aB9F1DD1-FFBF-3fe0-C1d1-e1D4Bd7Ba2cD',
      createDate: '2022-12-21 09:59:09'
    },
    {
      username: 102033,
      pwd: '1482e849-Bc54-f6f3-E0C9-be335fcBCDD8',
      createDate: '2022-12-26 01:10:22'
    },
    {
      username: 102034,
      pwd: '74F9D5ce-dA15-483b-6Ba9-BDCC191DFcAE',
      createDate: '2022-12-18 18:33:54'
    },
    {
      username: 102035,
      pwd: 'FBfB31EF-F35e-9fb4-2fdC-91f1e62dDE9c',
      createDate: '2022-12-17 00:42:59'
    },
    {
      username: 102036,
      pwd: '446b6cED-FDbb-76A5-9c2B-35BA1C82B736',
      createDate: '2022-12-08 21:56:22'
    },
    {
      username: 102037,
      pwd: '56543Ef6-bBd9-EB8e-D45C-CFCF17d6e8cE',
      createDate: '2022-12-21 04:33:04'
    },
    {
      username: 102038,
      pwd: 'c9301f41-bD56-25fE-C34D-dfFEeee9C0fe',
      createDate: '2022-12-24 04:54:20'
    },
    {
      username: 102039,
      pwd: '645cEEcA-ECbC-D9CA-0c8A-eF5ba3EAf5fE',
      createDate: '2022-12-31 04:12:03'
    },
    {
      username: 102040,
      pwd: '92aFF95E-EA60-A2Fe-ef98-c8E1fa0e2BBE',
      createDate: '2022-12-14 14:16:05'
    },
    {
      username: 102041,
      pwd: 'C2BEDEC0-4ECA-C286-Fcb5-BfdbA6c12f4e',
      createDate: '2022-12-29 21:38:14'
    },
    {
      username: 102042,
      pwd: '22FeFcDD-9f6D-53De-96Df-2C3a7d362f8f',
      createDate: '2022-12-24 08:16:23'
    },
    {
      username: 102043,
      pwd: '1C5C74f3-e4CF-fc7A-0BC4-e9253323b4D3',
      createDate: '2022-12-22 06:42:05'
    },
    {
      username: 102044,
      pwd: 'AabfB72c-b56c-6C2A-9Edd-3f603E29A1d8',
      createDate: '2022-12-04 01:00:44'
    },
    {
      username: 102045,
      pwd: '8Fc11c2D-3c58-DAFA-68A5-D482A56D3626',
      createDate: '2022-12-09 22:38:12'
    },
    {
      username: 102046,
      pwd: 'dB1E8336-FB8F-be33-47f8-AE7F6fD7CF2E',
      createDate: '2022-12-25 19:22:45'
    },
    {
      username: 102047,
      pwd: 'Eb4b49b8-88f4-D180-7Fd8-36A974AE94F3',
      createDate: '2022-12-20 23:07:27'
    },
    {
      username: 102048,
      pwd: '8D42Cb09-3BB3-b6e7-f2B1-A344D3dbb2FF',
      createDate: '2022-12-16 16:29:18'
    },
    {
      username: 102049,
      pwd: '5F63Be83-e74D-d398-f57D-253CBeC48Fa8',
      createDate: '2022-12-31 02:57:36'
    }
  ];
function testDate(){
    let now = new Date("2022/12/31");
    let seriesData = [];
    let xAxisData = [];
    for(let i = 0;i < 30;i++){
        now.setDate(now.getDate() - 1);
        let length = users.filter(item => {
            let d = new Date(item.createDate);
            return now.getDate() == d.getDate();
        }).length;
        xAxisData.push((now.getMonth() + 1) + '/' + now.getDate());
        seriesData.push(length);
    }
    console.log(xAxisData,seriesData);
}
// testDate();

console.log(new Date('2022-12-31 16:36:44'));